﻿using Mock1G3.BussinessLogic;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Threading;

namespace Mock1G3.UserControl.UCViewHistory
{
    public partial class ListTime : System.Web.UI.UserControl
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }
        protected void btn1w_Click(object sender, EventArgs e)
        {
            switch ((sender as Button).ID)
            {
                case "btn1":
                    Thread.Sleep(TimeSpan.FromSeconds(3));
                    foreach (Control item in this.Parent.Controls)
                    {
                        if (item.ID.Equals("OneW"))
                        {
                            item.Visible = true;
                            continue;
                        }
                        else item.Visible = false;
                    }
                    break;
            }
        }



        protected void btn1m_Click(object sender, EventArgs e)
        {
            switch ((sender as Button).ID)
            {
                case "btn2":
                    Thread.Sleep(TimeSpan.FromSeconds(3));
                    foreach (Control item in this.Parent.Controls)
                    {
                        if (item.ID.Equals("OneM"))
                        {
                            item.Visible = true;
                            continue;
                        }
                        else
                            item.Visible = false;
                    }


                    break;
            }
        }

        protected void btn4m_Click(object sender, EventArgs e)
        {
            switch ((sender as Button).ID)
            {
                case "btn3":
                    Thread.Sleep(TimeSpan.FromSeconds(3));
                    foreach (Control item in this.Parent.Controls)
                    {
                        if (item.ID.Equals("FourM"))
                        {
                            item.Visible = true;
                            continue;
                        }
                        item.Visible = false;
                    }
                    break;
            }
        }

        protected void btn6m_Click(object sender, EventArgs e)
        {
            switch ((sender as Button).ID)
            {
                case "btn4":
                    Thread.Sleep(TimeSpan.FromSeconds(3));
                    foreach (Control item in this.Parent.Controls)
                    {
                        if (item.ID.Equals("SixM"))
                        {
                            item.Visible = true;
                            continue;
                        }
                        item.Visible = false;
                    }
                    break;
            }
        }

        protected void btn1y_Click(object sender, EventArgs e)
        {
            switch ((sender as Button).ID)
            {
                case "btn5":
                    Thread.Sleep(TimeSpan.FromSeconds(3));
                    foreach (Control item in this.Parent.Controls)
                    {
                        if (item.ID.Equals("OneY"))
                        {
                            item.Visible = true;
                            continue;
                        }
                        item.Visible = false;
                    }
                    break;
            }
        }

        protected void btn2y_Click(object sender, EventArgs e)
        {
            switch ((sender as Button).ID)
            {
                case "btn6":
                    Thread.Sleep(TimeSpan.FromSeconds(3));
                    foreach (Control item in this.Parent.Controls)
                    {
                        if (item.ID.Equals("TwoY"))
                        {
                            item.Visible = true;
                            continue;
                        }
                        item.Visible = false;
                    }
                    break;
            }
        }
        protected void btnCancel_Click(object sender, EventArgs e)
        {
            Response.Redirect("Default.aspx");
        }

    }
}